const tableConfig = {
	stripe: true,
	border: true,
	maxHeight: '80vh',
	columns: [
		{ label: '模型名称', prop: 'name' },
		{ label: '模型标识', prop: 'key' },
		{ label: '模型分类', prop: 'category' },
		{ label: '创建时间', prop: 'createTime' },
		{
			label: '操作',
			prop: 'menu',
			width: 300,
			fixed: 'right',
		},
	],
}

export const baseConfig: any = {
	pageName: '模型管理',
	dictcodes: [],
	rowKey: 'id',
	addLabel: '新增模型',
	tipLabel: 'name',
	exportMqTopic: '/ning/export/',
	api: {
		index: 'act_model_page',
		add: 'act_model_insert',
		delete: 'act_model_delete',
		deploy: 'act_model_deploy',
	},
	auth: {
		index: 'act_model_page',
		add: 'act_model_insert',
		delete: 'act_model_delete',
		deploy: 'act_model_deploy',
	},
	dialogConfig: {
		// width: '90%'
		fullscreen: true,
	},
	menuBtn: [
		{
			icon: 'editor',
			label: '流程图',
			type: 'primary',
			operate: 'FlowChart',
			auth: '',
			text: true,
			show: true,
		},
		{
			icon: 'editor',
			label: '部署',
			type: 'primary',
			operate: 'deploy',
			auth: 'act_model_deploy',
			text: true,
			show: true,
		},
		{
			icon: 'delete',
			label: '删除',
			type: 'danger',
			operate: 'delete',
			auth: 'act_model_delete',
			text: true,
			show: true,
		},
	],
	formConfig: {
		inline: false,
		showBtn: true,
		labelPosition: 'right',
		labelWidth: 120,
		column: [
			{
				label: '模型名称',
				prop: 'name',
				type: 'input',
				rules: [{ required: true, message: '请输入模型名称' }],
				span: 24,
			},
			{
				label: '模型标识',
				prop: 'key',
				type: 'input',
				rules: [{ required: true, message: '请输入模型标识' }],
				span: 24,
			},
			{
				label: '模型分类',
				prop: 'category',
				type: 'input',
				rules: [{ required: true, message: '请输入模型分类' }],
				span: 24,
			},
			{
				label: '描 述',
				prop: 'desc',
				type: 'input',
				rules: [{ required: true, message: '请输入模型描述' }],
				span: 24,
			},
		],
	},
	searchConfig: {
		inline: true,
		showBtn: true,
		labelPosition: 'left',
		column: [
			{
				label: '模型分类',
				prop: 'category',
				type: 'input',
				span: 6,
			},
		],
	},
	tableConfig,
}
